Optimal. Leaf size=46 \[ \frac {a (A+B \tan (e+f x))^2}{2 (i A+B) c^2 f (1-i \tan (e+f x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {3669, 37}
\begin {gather*} \frac {a (A+B \tan (e+f x))^2}{2 c^2 f (B+i A) (1-i \tan (e+f x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 3669
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x)) (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^2} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {A+B x}{(c-i c x)^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a (A+B \tan (e+f x))^2}{2 (i A+B) c^2 f (1-i \tan (e+f x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.80, size = 62, normalized size = 1.35 \begin {gather*} \frac {a ((-3 i A+B) \cos (e+f x)-(A+3 i B) \sin (e+f x)) (\cos (3 (e+f x))+i \sin (3 (e+f x)))}{8 c^2 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 46, normalized size = 1.00
method | result | size |
derivativedivides | \(\frac {a \left (\frac {i B}{i+\tan \left (f x +e \right )}-\frac {-i A -B}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}\right )}{f \,c^{2}}\) | \(46\) |
default | \(\frac {a \left (\frac {i B}{i+\tan \left (f x +e \right )}-\frac {-i A -B}{2 \left (i+\tan \left (f x +e \right )\right )^{2}}\right )}{f \,c^{2}}\) | \(46\) |
risch | \(-\frac {a \,{\mathrm e}^{4 i \left (f x +e \right )} B}{8 c^{2} f}-\frac {i a \,{\mathrm e}^{4 i \left (f x +e \right )} A}{8 c^{2} f}+\frac {a \,{\mathrm e}^{2 i \left (f x +e \right )} B}{4 c^{2} f}-\frac {i a \,{\mathrm e}^{2 i \left (f x +e \right )} A}{4 c^{2} f}\) | \(80\) |
norman | \(\frac {\frac {a A \tan \left (f x +e \right )}{c f}+\frac {i a B \left (\tan ^{3}\left (f x +e \right )\right )}{c f}+\frac {-i a A +a B}{2 c f}+\frac {\left (i a A +3 a B \right ) \left (\tan ^{2}\left (f x +e \right )\right )}{2 c f}}{c \left (1+\tan ^{2}\left (f x +e \right )\right )^{2}}\) | \(95\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.19, size = 48, normalized size = 1.04 \begin {gather*} \frac {{\left (-i \, A - B\right )} a e^{\left (4 i \, f x + 4 i \, e\right )} - 2 \, {\left (i \, A - B\right )} a e^{\left (2 i \, f x + 2 i \, e\right )}}{8 \, c^{2} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 153 vs. \(2 (36) = 72\).
time = 0.20, size = 153, normalized size = 3.33 \begin {gather*} \begin {cases} \frac {\left (- 8 i A a c^{2} f e^{2 i e} + 8 B a c^{2} f e^{2 i e}\right ) e^{2 i f x} + \left (- 4 i A a c^{2} f e^{4 i e} - 4 B a c^{2} f e^{4 i e}\right ) e^{4 i f x}}{32 c^{4} f^{2}} & \text {for}\: c^{4} f^{2} \neq 0 \\\frac {x \left (A a e^{4 i e} + A a e^{2 i e} - i B a e^{4 i e} + i B a e^{2 i e}\right )}{2 c^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.66, size = 84, normalized size = 1.83 \begin {gather*} -\frac {2 \, {\left (A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + i \, A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - B a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - A a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{c^{2} f {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.49, size = 51, normalized size = 1.11 \begin {gather*} \frac {\frac {a\,\left (-B+A\,1{}\mathrm {i}\right )}{2}+B\,a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}{c^2\,f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^2+\mathrm {tan}\left (e+f\,x\right )\,2{}\mathrm {i}-1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________